package com.dcy.facade;

/**
 * @Author：dcy
 * @Description: 采用单例模式（饿汉式）
 * @Date: 2021/1/22 10:27
 */
public class DVDPlayer {

    private static DVDPlayer dvdPlayer = new DVDPlayer();

    private DVDPlayer() {

    }

    public static DVDPlayer getInstance() {
        return dvdPlayer;
    }

    public void on() {
        System.out.println(" dvd on");
    }

    public void off() {
        System.out.println(" dvd off");
    }

    public void play() {
        System.out.println(" dvd is playing ");
    }

    public void pause() {
        System.out.println(" dvd pause ");
    }
}
